/**
 * Company : SIANGKLOM.
 * Created By : Chatree Siangklom
 * Created On : Oct 15, 2013  2:11:06 PM 
 * e-Mail : dr_chatree@hotmail.com
 * Mobile Phone : (+66) 087-921-5115
 * Package Name : com.tis.database.services.promis
 * File Name : IPaymentVoucherServices.java
 * TODO
 */
package com.tis.database.services.promis;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;

import org.hibernate.HibernateException;
import org.hibernate.criterion.Criterion;

import com.tis.database.entitys.promis.GlPostingDetail;
import com.tis.database.entitys.promis.PaymentVoucher;
import com.tis.database.entitys.promis.PaymentVoucherPK;

/**
 * @author Chatree Siangklom of Administrator
 * Date =Oct 15, 2013 : 2:11:06 PM 
 * CreateBy=Chatree Siangklom
 * 
 * IPaymentVoucherServices
 * TODO
 */
public interface IPaymentVoucherServices {
	
	PaymentVoucher findById(PaymentVoucherPK id) throws HibernateException, Exception;
	
	void saveOrUpdate(PaymentVoucher e) throws HibernateException, Exception;
	
	void saveOrUpdate(List<PaymentVoucher> e)  throws HibernateException, Exception;
	
	List<PaymentVoucher> findByCriteria(Criterion criterion) throws HibernateException, Exception;
	
	List<PaymentVoucher> findByAll(int MaxResults) throws HibernateException, Exception;
	
	List<PaymentVoucher> findHQLByQuery(String hql, HashMap<String, String> parameter) throws HibernateException;
	
	void SaveOrUpdateHQLByQuery(String hql, HashMap<String, String> parameter) throws HibernateException;
	
	List<PaymentVoucher> findNameQuery(String queryName, HashMap<String, String> parameter) throws HibernateException;
	
	void SaveOrUpdateQueryName(String queryName, HashMap<String, String> parameter) throws HibernateException;
	
	BigDecimal NextSequence(String name) throws HibernateException, Exception;
	
	BigDecimal NextInstanceNo() throws HibernateException, Exception;
	
	void UpdateBackSapMessage(GlPostingDetail glPostingDetail) throws HibernateException, Exception;
	
	List<PaymentVoucher> FindByIs(String status, String syncIsstaging, String syncIssync, int maxResult) throws Exception;
	
}
